<div class="content fixed-fluid">
    <div class="row-fluid">
        <div class="main-content">
            <div class="mozaic-widget widget-timeline_stream_state_manager" data-guid="widget-156" data-initialized="true" >
                <div class="mozaic-widget widget-timeline" data-guid="widget-179" data-initialized="true" >
                    <div class="mentions tasks_annotables-mentions list-viewport">
                        <?php
                        $tagGroups = Tag::getGroups();
                        $tags = Tag::getTagsByGroup();
                        if (count($tagGroups) > 3) {
                            ?>
                            <div id="tagMenu" class="dropdown-menu" style="display: none;">
                                <ul class="overview">
                                    <?php foreach ($tagGroups as $group) : ?>
                                        <li data-id="<?php echo $group['id']; ?>" class="email">
                                            <a><font><?php echo $group['name']; ?></font></a>
                                            <div class="dropdown-menu">
                                                <ul class="overview sub-menu">
                                                    <?php
                                                    foreach ($tags as $tag) :
                                                        if ($tag->groupId != $group['id'])
                                                            continue;
                                                        ?>
                                                        <li data-id="<?php echo $tag->tagId; ?>" class="email">
                                                            <a title="<?php echo $tag->keywords; ?>"><font><?php echo $tag->tagName; ?></font></a>
                                                        </li>
                                                    <?php endforeach; ?>
                                                </ul>
                                            </div>
                                        </li>
                                    <?php endforeach; ?>
                                </ul>
                            </div>

                        <?php } else { ?>
                            <div id="tagMenu" class="dropdown-menu" style="display: none;">
                                <ul class="overview vertical">
                                    <?php foreach ($tagGroups as $group) : ?>                   
                                        <li>
                                            <a><font><?php echo $group['name']; ?></font></a>
                                            <ul class="overview sub-menu">
                                                <?php
                                                foreach ($tags as $tag) :
                                                    if ($tag->groupId != $group['id'])
                                                        continue;
                                                    ?>
                                                    <li data-id="<?php echo $tag->tagId; ?>" class="email">
                                                        <a title="<?php echo $tag->keywords; ?>"><font><?php echo $tag->tagName; ?></font></a>
                                                    </li>
                                                <?php endforeach; ?>
                                            </ul>
                                        </li>
                                    <?php endforeach; ?>
                                </ul>
                            </div>
                        <?php } ?>
                        <ul class="mozaic-widget list skip-loading-animation widget-list">
                            <?php include("View/Desktop/Activity/SingleTask.php"); ?>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>